import './assets/main.css';

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 引入common.scss
import '@/styles/common.scss'

import App from './App.vue'
import router from './router'


// import {getCategoryAPI} from "./api/test"
// getCategoryAPI().then(res=>{
//     console.log(res)
// })

// 创建 Pinia 实例  
const pinia = createPinia();  
pinia.use(piniaPluginPersistedstate); 

const app = createApp(App)
app.use(pinia)
app.use(router)
app.use(ElementPlus) 

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
app.mount('#app')
